﻿using System;
using System.Linq;
using System.Collections.Generic;
using HashFoo.Rest.Server;

namespace HashFoo.Rest.ServerTests.FakeHttpStack
{
    public class FakeMembershipProvider : IMembershipProvider
    {
        /// <summary>
        /// Returns true if the username and password are valid.
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public bool ValidateUser(string userName, string password)
        {
            return true;
        }

        /// <summary>
        /// The the roles (as strings) that a user belongs to.
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public string[] GetRoles(string userName)
        {
            return new [] { "admin", "user" };
        }
    }
}